package com.chat.common.common.exception;

import org.springframework.http.HttpStatus;

/**
 * @author qianzui333
 * 业务异常
 */
public class BaseException extends RuntimeException {
    public HttpStatus statusCode = HttpStatus.BAD_REQUEST;  // 默认状态码为400
    public BaseException() {
    }
    public BaseException(String msg) {
        super(msg);
    }
    public BaseException(HttpStatus statusCode,String msg) {
        super(msg);
        this.statusCode = statusCode;
    }

    public BaseException(HttpStatus statusCode,String msg,Throwable cause) {
        super(msg,cause);
        this.statusCode = statusCode;
    }

    public HttpStatus getStatusCode() {
        return statusCode;
    }
}